home *** CD-ROM | disk | FTP | other *** search
- on exitFrame
- global gCurrQuestion, gAnimObj, gQAnimFirst, gQAnimLength, gVoiceChannel, gPathToSound, fileDelimiter, gCurrQString, gValue, gOrder, gCategory, gTextData, gTenQList, gScoreList, gValueSprite, gCatSprite, gNumOfQuestions, gWhoBuzzedIn
- set gWhoBuzzedIn to 0
- if not (the puppet of sprite gValueSprite) then
- puppetSprite(gValueSprite, 1)
- end if
- set the memberNum of sprite gValueSprite to the number of member "Null Cast" of castLib "categories and point values"
- if not (the puppet of sprite gCatSprite) then
- puppetSprite(gCatSprite, 1)
- end if
- set the memberNum of sprite gCatSprite to the number of member "Null Cast" of castLib "categories and point values"
- unloadMember()
- set gCurrQuestion to gCurrQuestion + 1
- if gCurrQuestion > gNumOfQuestions then
- KillEmPuppets()
- go("Winner Is")
- exit
- end if
- set the text of field "player1 score" to string(getAt(gScoreList, 1))
- set the text of field "player2 score" to string(getAt(gScoreList, 2))
- set the text of field "player3 score" to string(getAt(gScoreList, 3))
- set jStartFrame to getAt(gQAnimFirst, gCurrQuestion)
- set jNumOfFrames to getAt(gQAnimLength, gCurrQuestion)
- unloadMember()
- preloadMember(member jStartFrame, member (the number of member jStartFrame + jNumOfFrames - 1))
- init(gAnimObj, jStartFrame, jNumOfFrames, point(240, 60), 0)
- sound playFile gVoiceChannel, gPathToSound & "qanda" & fileDelimiter & "qstn" & gCurrQuestion & "_1.aif"
- set the actorList to []
- add(the actorList, gAnimObj)
- updateStage()
- set jQuestion to getAt(gTenQList, gCurrQuestion)
- set jLine to ((jQuestion - 1) * 7) + 1
- set gCurrQString to addZeroes(jQuestion)
- set jTempText to line jLine + 5 of gTextData
- if the machineType = 256 then
- put EMPTY into char 1 of jTempText
- end if
- set gCategory to integer(jTempText)
- set gValue to random(5)
- set the text of field "question text" to line jLine + 1 of gTextData
- if the machineType = 256 then
- put EMPTY into char 1 of field "question text"
- end if
- set jRandom to random(6)
- case jRandom of
- 1:
- set gOrder to [1, 2, 3]
- 2:
- set gOrder to [1, 3, 2]
- 3:
- set gOrder to [3, 1, 2]
- 4:
- set gOrder to [2, 1, 3]
- 5:
- set gOrder to [2, 3, 1]
- otherwise:
- set gOrder to [3, 2, 1]
- end case
- set the text of field "choice 1 text" to line jLine + 1 + getAt(gOrder, 1) of gTextData
- if the machineType = 256 then
- put EMPTY into char 1 of field "choice 1 text"
- end if
- set the text of field "choice 2 text" to line jLine + 1 + getAt(gOrder, 2) of gTextData
- if the machineType = 256 then
- put EMPTY into char 1 of field "choice 2 text"
- end if
- set the text of field "choice 3 text" to line jLine + 1 + getAt(gOrder, 3) of gTextData
- if the machineType = 256 then
- put EMPTY into char 1 of field "choice 3 text"
- end if
- end
-